Generic Pipelines

From RidgeRun Developer Wiki

Follow Us On Twitter LinkedIn Email Share this page







Preferred Partner Logo 3 Partner Program Banner




Generic Pipelines

The following pipelines use the sample rrbrowsersink.js file and the index.html provided in the evaluation version and the repository. This files can be modified or changed depending on your requirements but in general the same pipelines can work.

File to Browser

The following pipeline reads a video file and then streams it to the page by using the rrbrowsersink element.

VIDEO=<PATH_TO_VIDEO_FILE>
gst-launch-1.0 filesrc location=$VIDEO ! qtdemux ! h264parse ! avdec_h264 ! queue ! videoconvert ! queue ! identity sync=true ! x264enc key-int-max=30  speed-preset=ultrafast tune=zerolatency bitrate=5000 ! h264parse ! rrbrowsersink port=8080 reliable=false async-handling=true

You can also read an image and then deploy it in the browser as follows.

IMAGE=<PATH_TO_IMAGE_FILE>
gst-launch-1.0 filesrc location=$IMAGE ! jpegparse ! jpegdec ! imagefreeze ! queue ! videoconvert ! queue ! identity sync=true ! x264enc key-int-max=30  speed-preset=ultrafast tune=zerolatency bitrate=5000 ! h264parse ! rrbrowsersink port=8080 reliable=false async-handling=true


Camera to Browser

The following pipeline shows how to project the camera capture to the browser with rrbrowsersink.

gst-launch-1.0 v4l2src ! queue max-size-buffers=3 leaky=downstream ! videoconvert ! queue ! x264enc key-int-max=30 speed-preset=ultrafast tune=zerolatency bitrate=5000 ! h264parse ! rrbrowsersink port=8080 reliable=false